TRAINING_PARAMS = \
{
    "model_param": {
        "backbone_name": "darknet_21",
        "backbone_pretrained": "", #  set empty to disable
    },
    "yolo": {
        # "anchors": [[[116, 90], [156, 198], [373, 326]],
        #             [[30, 61], [62, 45], [59, 119]],
        #             [[10, 13], [16, 30], [33, 23]]],
        "anchors": [[[36, 124], [117, 87], [63, 219]],
                    [[14, 49], [21, 72], [48, 42]],
                    [[15, 15], [10, 29], [27, 27]]],
        "num_class": 2,

    },
    "loss_hyp": {
                'iou': 3.54,
                'cls': 1.481,  # cls loss fraction
                'obj': 1.509,  # obj conf loss fraction
                'obj_pw': 1.0,  # obj BCELoss positive_weight
                'cls_pw': 1.0,   # cls BCELoss positive_weight
    },
    "lr": {
        "backbone_lr": 0.001,
        "other_lr": 0.002,
        "freeze_backbone": False,   #  freeze backbone wegiths to finetune
        "lrf": -3.441, # lr_lambda fraction
    },
    "optimizer": {
        "type": "adam",              # adam, sgd, amsgrad, rmsprop
        "weight_decay": 0.0004841,
    },
    "data": {
        "train": "/data/Dataset/IR-2cls/train.txt",
        "valid": "/data/Dataset/IR-2cls/test.txt",
        "names": "/data/Dataset/IR-2cls/classes.txt",
    },
    "augment": True,
    "multiscale_train": True,
    "resume": False,                # resume latest train precess
    "pretrain_snapshot": "weights/latest.pt",        # checkpoint
    # "pretrain_snapshot": "weights/20201109_IR-2cls.pt",
    "batch_size": 2,
    "epochs": 100,
    "img_size": [448, 448],
    "n_cpu": 2,
    "gradient_accumulation": 1,
    "evaluation_interval": 1,
    "checkpoint_interval": 1,
    "parallels": [0,1,2,3],                         #  config GPU device
    "export_onnx": False,
    "onnx_file": "weights/latest.onnx",
    "export_darknet_weights": False,
    "darknet_weights": "weights/latest.weights",


}

DETECT_PARAMS = \
{
    "model_param": {
        "backbone_name": "darknet_21",
        "backbone_pretrained": "", #  set empty to disable
    },
    "yolo": {
            "anchors": [[[36, 124], [117, 87], [63, 219]],
                        [[14, 49], [21, 72], [48, 42]],
                        [[15, 15], [10, 29], [27, 27]]],
            "num_class": 2,
    },
    "classname_file": "/data/Dataset/IR-2cls/classes.txt",
    "batch_size": 2,
    "detect_path": "data/samples",
    "out_path": "data/output",
    "weights_path": "weights/latest.pt",
    "img_size": 416,
    "conf_thrs": 0.8,
    "nms_thrs": 0.5,
}